package com.sundayfactory.workpaychart;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class workpay_provider {
    private static final int DB_VERSION = 1;
    interDatabase database;
    public workpay_provider(Context context) {
	database = new interDatabase(context);
    }
    
    
    class interDatabase extends SQLiteOpenHelper{
	public interDatabase(Context context) {
	    super(context, "workpay.db", null, DB_VERSION);
	    
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
	    String SQL_Query = "CREATE TABLE IF NOT EXISTS payinfo (" +
			"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
			"code 		TEXT, "+
			"id 		TEXT, "+
			"title 		TEXT, "+
    			"pay 		TEXT, "+
    			"year 		TEXT, "+
			"workercode   	TEXT  "+
			
			
			");";
	    
	    db.execSQL(SQL_Query);
	    
	    
	    String SQL_Query_detail = "CREATE TABLE IF NOT EXISTS detail (" +
			"_id INTEGER PRIMARY KEY AUTOINCREMENT, " +
			"year 		TEXT, "+
			"link 		TEXT, "+
			"workday 	TEXT);";
	    db.execSQL(SQL_Query_detail);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	    // TODO Auto-generated method stub
	    
	}
	
	
	
    }
}
